package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyAddrUsesPK implements Serializable {
    public Long entityId;
    public Long entityVersionNum;
    public Long addressId;
    public String use;    

    public RimCoreEntyAddrUsesPK() {
    }

    public RimCoreEntyAddrUsesPK(Long entityId, Long entityVersionNum, Long addressId, String use) {
        this.entityId = entityId;
        this.entityVersionNum = entityVersionNum;
        this.addressId = addressId;
        this.use = use;
        
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyAddrUsesPK) {
            final RimCoreEntyAddrUsesPK otherEntyAddrUsesPK = (RimCoreEntyAddrUsesPK) other;
            final boolean areEqual = 
                (otherEntyAddrUsesPK.addressId.equals(addressId) && otherEntyAddrUsesPK.use.equals(use) && otherEntyAddrUsesPK.entityId.equals(entityId) && otherEntyAddrUsesPK.entityVersionNum.equals(entityVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
